package com.mk.car.dao;

import java.util.List;

import org.nutz.dao.Dao;
import org.nutz.dao.pager.Pager;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

import com.mk.car.entity.Car;

@IocBean
public class CarMapper
{
	@Inject
	Dao dao;
	
	/**
	 * 分页查询
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public List<Car> listCar(Integer pageIndex,Integer pageSize)
	{
		Pager pager = dao.createPager(pageIndex, pageSize);
		List<Car> list = dao.query(Car.class, null, pager);
		
		return list;
	}
	
	
}
